package jmind.hyena.example.service;

import com.alibaba.fastjson.JSON;
import jmind.dolphin.frame.DolphinCommand;
import jmind.dolphin.frame.Service;


/**
 * Created by xieweibo on 2016/11/30.
 */
public class SampleService implements Service {
    @Override
    public String get(DolphinCommand key) {
        System.out.println(key.getCommand()+key.getServiceName());
        return key.getParams();
    }

    @Override
    public String set(DolphinCommand cmd) {
        return JSON.toJSONString(cmd);
    }

    @Override
    public int del(DolphinCommand key) {

        return 1;
    }
}
